package impl;

import java.util.Random;

public class Impl_4 {
    //事件id
    // 1搜索    2领取免费阅读卡   3 阅读    4换一本    5领取书币   6分享领取   7集赞     8试试手气领取赠书
    // 9分享   10充值    11关注好友  12管理订单  13点赞    14分享
    public String addevent_id() {
        return Integer.toString(new Random().nextInt(14)+1);
    }
    //分类页,书单页,免费页,男生小说,听书,漫画,新书,有声剧,公众号,书架,看一看,今日更新,
       //     ,朋友赞过,我的主页,账户,购物车,读书排行榜
    public String addevent_page() {
        switch (addevent_id()){
            case "1":
                return "书单页";
            case "2":
                return "免费页";
            case "3":
                return "阅读页";
            case "4":
                return "书单页";
            case "5":
                return "书单页";
            case "6":
                return "看一看";
            case "7":
                return "看一看";
            case "8":
                return "书单页";
            case "10":
                return "账户";
            case "11":
                return "好友列表";
            case "12":
                return "我的主页";
            case "13":
                return "看一看";
            case "14":
                return "看一看";
            default:return "dd";
        }
    }

    public String addevent_component() {
        if(Integer.parseInt(addevent_id())<4 ){
            return "展示";
        }
        if(Integer.parseInt(addevent_id())<8 ){
            return "领取卡卷";
        }
        if(Integer.parseInt(addevent_id())<14 ){
            return "分享";
        }
        return "支付";
    }

    public String addevent_booth() {
        if(Integer.parseInt(addevent_id())<4 ){
            return "左上";
        }
        if(Integer.parseInt(addevent_id())<7 ){
            return "右上";
        }
        if(Integer.parseInt(addevent_id())<10 ){
            return "中间";
        }
        if(Integer.parseInt(addevent_id())<10 ){
            return "左下";
        }
        if(Integer.parseInt(addevent_id())<10 ){
            return "右下";
        }
        return "居中";
    }

    public String addevent_type() {
        if(Integer.parseInt(addevent_id())<4 ){
            return "阅读";
        }
        if(Integer.parseInt(addevent_id())<7 ){
            return "分享";
        }
        if(Integer.parseInt(addevent_id())<10 ){
            return "购买";
        }
        if(Integer.parseInt(addevent_id())<12 ){
            return "查询";
        }
        return "退出";
    }

    public String addad_id() {
        return Integer.toString(new Random().nextInt(89999)+10001);
    }

    public String addad_type() {
        if(Integer.parseInt(addad_id())%2==0){
            return "医疗";
        }
        if(Integer.parseInt(addad_id())%3==0){
            return "购物";
        }
        if(Integer.parseInt(addad_id())%5==0){
            return "视频";
        }
        if(Integer.parseInt(addad_id())%7==0){
            return "保险";
        }
        return "app";
    }

    public String addecpm() {
        return Integer.toString(new Random().nextInt(2000)+50);
    }

    public String addad_ecode() {
        String[] ecode={"123","345","555","678"};
        int i = new Random().nextInt(4);
        if(i==0){
            return ecode[0];
        }
        if(i==1){
            return ecode[1];
        }
        if(i==2){
            return ecode[2];
        }
        return ecode[3];
    }

    public Integer addcount() {
        return new Random().nextInt(20)+1;
    }

    public String addsid() {
        return Integer.toString(new Random().nextInt(8999)+1001);
    }

    public String addversion() {
        String[] v={"1.1.1","2.2.2","2.2.3","3.3.4"};
        int i = new Random().nextInt(4);
        if(i==0){
            return v[0];
        }
        if(i==1){
            return v[1];
        }
        if(i==2){
            return v[2];
        }
        return v[3];
    }

}
